跳至主要内容

[Docker] Command Snippets

docker attach

Attach local standard input, output, and error streams to a running container

docker attach [OPTIONS] CONTAINER
  • CTRL-c sends a SIGINT to the container.
  • CTRL-p CTRL-q key sequence to detach from the container.

docker commit

Create a new image from a container’s changes

docker commit [OPTIONS] CONTAINER [REPOSITORY[:TAG]]

See Also

Docker Documentation